home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_09
/
9n09087a
< prev
next >
Wrap
Text File
|
1991-07-08
|
3KB
|
109 lines
/******************************************************
* Listing 5 hostcom.h
*
* Header file for HOSTCOM
*
*****************************************************/
/* length of STAT_LINE is 80 characters
* vertical line is ALT-179 (typed on numeric keypad)
*/
#define STAT_LINE " │ │"\
" │ F3-CLEAR │ F4-RESET │ F7-OIA │ F10-EXIT "
#define CONNECT_ERROR "HOSTCOM: Cannot connect."\
" Possible reasons:\n"\
" 1. System error\n"\
" 2. Resource unavailable\n"\
" 3. Emulation software or HLLAPI not loaded\n"
#define VID_ERROR "HOSTOM: Wrong video type\n"
#define HOSTCOM_MSG \
"HOSTCOM -- PC to Host Communication\n"\
"Specify emulation software:\n"\
" 0 = IBM 3270 Personal Com. 3 = RabbitGATE\n"\
" 1 = IBM Entry Level Emulator 4 = Simulated\n"\
" 2 = Attachmate Extra! for DOS 5 = Sim. with data\n"
#define SIGNOFF_MSG \
"--- Not Signed Off --- Depress ESC to continue"
#define OIA_MSG \
"--- OIA Data -- Depress ESC to continue"
/* function keys */
#define K_F1 (59 | 0x100)
#define K_F2 (60 | 0x100)
#define K_F3 (61 | 0x100) /* clear */
#define K_F4 (62 | 0x100) /* reset */
#define K_F5 (63 | 0x100)
#define K_F6 (64 | 0x100)
#define K_F7 (65 | 0x100)
#define K_F8 (66 | 0x100)
#define K_F9 (67 | 0x100)
#define K_F10 (68 | 0x100) /* exit */
#define K_CF10 (103 | 0x100) /* CTRL-F10:
* unconditional exit
*/
#define K_ESC 27 /* escape */
#define K_INS (82 | 0x100) /* insert */
#define K_DEL (83 | 0x100) /* delete */
#define K_TAB 9 /* tab */
#define K_BACKTAB (15 | 0x100) /* backtab */
#define K_ENTER 13
#define K_BACKSPACE 8
#define K_HOME (71 | 0x100) /* cursor keys */
#define K_LEFT (75 | 0x100)
#define K_RIGHT (77 | 0x100)
#define K_UP (72 | 0x100)
#define K_DOWN (80 | 0x100)
#define K_CTRLR 18 /* CTRL-R: return */
extern int hllapi_level; /* emulation softw. in use */
extern int norm_attr; /* normal text */
extern int stat_attr; /* status line */
extern int wait_attr; /* wait attribute */
extern int time_attr; /* extended time attribute */
extern int send_attr; /* sending keys attribute */
extern int oia_attr; /* OIA line */
extern int clear_flag; /* flag for clear key */
void HLLC (int *func, char *data_string,
int *string_length, int *parm_4);
int get_key(void);
int process_error(int err);
int set_vid(void);
void write_string(int x, int y, char *s, int attr);
int receive_esc(void);
/* low level functions */
int connect_ps(void);
int search_ps(char *str, int *str_pos);
int send_key(char *keys);
int copy_ps(char *ps);
int reset(void);
int wait(void);
int copy_oia(unsigned char *api_str);
int dspy_cursor(void);
/* mid level functions */
int update_ps (char *ps);
void status_msg(char *msg, int attr);
int input_to_host(char *keys);
int keys_to_host(char *keys);
int host_wait(void);
int check_power(void);
int dspy_oia(void);
int check_signon(void);
int reset_connection(void);
int display_cursor(void);
int connect_ps_space(void);
int find_msg(char *msg);